﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using mal.balades.Business.Configuration;
using System.Configuration;

namespace mal.balades.Business.Credential
{
    class CredentialsSmtp : ICredentialsByHost
    {
        #region Fields
        private string smtpUserName;
        private string smtpPassword;
        //private ConfigurationHelper configurationHelper;
        #endregion

        #region Construction / Destruction
        public CredentialsSmtp()
        {
            smtpUserName = ConfigurationManager.AppSettings["SmtpUser"];
            smtpPassword = ConfigurationManager.AppSettings["SmtpPassword"];
        }
        #endregion


        #region ICredentialsByHost Members

        public NetworkCredential GetCredential(string host, int port, string authenticationType)
        {
            return new NetworkCredential(smtpUserName, smtpPassword);
        }

        #endregion
    }
}
